home *** CD-ROM | disk | FTP | other *** search
- on dispara toca
- global calibre, ener_robot, TabPotArmas, num_robot, hay_municion, cal_1, cal_2, cal_3, TabRobot, TabRobE, num_batalla
- set Pos to the number of cast "NIV_00.PIC"
- set hay_municion to 0
- if calibre = 1 then
- if cal_1 > 0 then
- set hay_municion to 1
- set cal_1 to cal_1 - 1
- if cal_1 = 0 then
- set niv_mun to 0
- else
- set niv_mun to integer((12 / (float(max_cal_1) / float(cal_1))) + 0.40000000000000002)
- end if
- set the castNum of sprite 30 to Pos + niv_mun
- end if
- else
- if calibre = 2 then
- if cal_2 > 0 then
- set hay_municion to 1
- set cal_2 to cal_2 - 1
- if cal_2 = 0 then
- set niv_mun to 0
- else
- set niv_mun to integer((12 / (float(max_cal_2) / float(cal_2))) + 0.40000000000000002)
- end if
- set the castNum of sprite 31 to Pos + niv_mun
- end if
- else
- if calibre = 3 then
- if cal_3 > 0 then
- set hay_municion to 1
- set cal_3 to cal_3 - 1
- if cal_3 = 0 then
- set niv_mun to 0
- else
- set niv_mun to integer((12 / (float(max_cal_3) / float(cal_3))) + 0.40000000000000002)
- end if
- set the castNum of sprite 32 to Pos + niv_mun
- end if
- end if
- end if
- end if
- if hay_municion then
- if toca then
- set ener_robot to ener_robot - getAt(TabPotArmas, calibre)
- if ener_robot <= 0 then
- sound stop 2
- puppetSound("muerterob")
- set the locH of sprite 3 to the mouseH
- set the locV of sprite 3 to the mouseV
- set tipo1 to "big1"
- set tipo2 to "big2"
- set tipo3 to "big3"
- set the castNum of sprite 3 to cast tipo1
- updateStage()
- espera(10)
- set the castNum of sprite 3 to cast tipo2
- updateStage()
- espera(10)
- set the castNum of sprite 3 to cast tipo3
- updateStage()
- espera(60)
- set the castNum of sprite 3 to cast tipo2
- updateStage()
- espera(5)
- set the castNum of sprite 3 to cast tipo1
- updateStage()
- espera(5)
- set the visible of sprite 3 to 0
- updateStage()
- espera(5)
- repeat while soundBusy(1)
- end repeat
- deleteAt(TabRobot, num_robot)
- deleteAt(TabRobE, num_robot)
- set ticks_busca to the ticks + 30
- set the visible of sprite 3 to 1
- go("control" & num_batalla)
- else
- puppetSound("tocado" & calibre)
- set the locH of sprite (3 + calibre) to the mouseH
- set the locV of sprite (3 + calibre) to the mouseV
- set the visible of sprite (3 + calibre) to 1
- updateStage()
- end if
- else
- puppetSound("disparo" & calibre)
- end if
- else
- end if
- end
-